package com.lpy.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;
import org.springframework.web.servlet.support.AbstractDispatcherServletInitializer;

/**
 * @author lpy
 * @date 2025/2/6
 * @Description
 */

public class ServletConfig extends AbstractAnnotationConfigDispatcherServletInitializer {
    @Override
    /**
     * @param
     * @return: java.lang.Class<?>[]
     * @Author: lpy
     * @date: 2025/2/6
     * @since 1.0.0
     * @Description: 对应spring容器配置类
     */
    protected Class<?>[] getRootConfigClasses() {
        return new Class[]{SpringConfig.class};
    }

    @Override
    //SpringMvc配置类
    protected Class<?>[] getServletConfigClasses() {
        return new Class[]{SpringMvcConfig.class};
    }

    @Override
    protected String[] getServletMappings() {
        return new String[]{"/"};
    }
}
